#====快排函数====
def insertion_sort(arr):
    for i in range(1, len(arr)):
        key = arr[i]
        j = i - 1
        while j >= 0 and arr[j] > key:
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = key
    return arr
#=====数组赋值函数部分====
def Shuru():
    n = int(input("请输入整数个数："))
    arr = []
    for i in range(n):
        num = int(input("请输入第{}个整数：".format(i + 1)))
        arr.append(num)
    return arr
if __name__ == '__main__':
    arr=Shuru()
    sorted_arr = insertion_sort(arr)
    print("排序后的整数为：", sorted_arr)
